package com.itheima.zy;
import java.util.Scanner;

public class Test11 {
    public static void main(String[] args) {

        //需求：请键盘输入五个整数数据，分别计算他们的，最大值，最小值，数据和，平均值。

        int[] a = new int[5];
        Scanner sc = new Scanner(System.in);
        for (int i = 0; i < a.length; i++) {
            System.out.println("请输入您的第" + (i + 1) + "数据");
            a[i] = sc.nextInt();
        }

        int max = a[0];
        int num2 = 0;
        int he = 0;
        int min = a[0];
        for (int i = 0; i < a.length; i++) {
            num2++;
            he += a[i];
            if (a[i] > max) {
                max = a[i];
            }else if (a[i] < min) {
                min = a[i];
            }
        }




        System.out.println("数量："+num2 );
        System.out.println("最大值："+max);
        System.out.println("最小值："+min);
        System.out.println("数量和："+he );
        System.out.println("平均值："+he/a.length);



    }
}
